import App from './App'
// 引入vuex
import store from './store/store'
// 引入api
import api from './src/api/index'
import baseUrl from './src/api/baseUrl'
// 引入uView 组件
import uView from "uview-ui";

// #ifndef VUE3
import Vue from 'vue'
Vue.config.productionTip = false
App.mpType = 'app'

//把vuex定义成全局组件
Vue.prototype.$store = store
Vue.prototype.$api = api
Vue.prototype.$baseUrl = baseUrl

Vue.use(uView)
const app = new Vue({
    ...App
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  const $api = api
  const $baseUrl = baseUrl
  app.use(store$baseUrl,uView,$baseUrl )
  return {
    app
  }
}
// #endif